﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Guline.SupportCMS.Models.Object
{
    public class Article
    {
        [Key]
        public int ID { get; set; }

        public string Title { get; set; }

        public bool Enable { get; set; }

        public string Image { get; set; }

        public string SourceLink { get; set; }
        public string SourceName { get; set; }

        public string ShortDes { get; set; }
        public string FullDes { get; set; }

        public DateTime created_Date { get; set; }

        public Nullable<int> Order { get; set; }

        public int ReadCount { get; set; }




        public Nullable<int> AccountID { get; set; }
        [ForeignKey("AccountID")]
        public virtual Account Account { get; set; }



        public Nullable<int> MainCategoryID { get; set; }

        [InverseProperty("Article")]
        public virtual ICollection<ArticleTag> ArticleTags { get; set; }


        [InverseProperty("Article")]
        public virtual ICollection<ArticleCategory> ArticleCategorys { get; set; }

        public Article()
        {
            this.created_Date = DateTime.Now;
        }
    }
}